package cn.bone.ou.user.controller;

import cn.bone.base.bean.CommonResult;
import cn.bone.ou.user.bean.User;
import cn.bone.ou.user.param.UserParam;
import cn.bone.ou.user.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/ou/user")
public class UserController {

    @Resource
    private IUserService userService;

    @RequestMapping("/addMock1")
    public CommonResult addMock1(Integer communityId){
        return userService.addMock1(communityId);
    }

    @RequestMapping("/addMock2")
    public CommonResult addMock2(Integer userId,Integer houseId){
        return userService.addMock2(userId,houseId);
    }

    @RequestMapping("/addMock3")
    public CommonResult addMock3(Integer userId){
        return userService.addMock3(userId);
    }

    @RequestMapping("/list")
    public CommonResult list(@Valid UserParam.ListParam param){
        return userService.list(param);
    }

    @RequestMapping("/usable")
    public CommonResult usable(@Valid UserParam.UsableParam param){
        return userService.usable(param);
    }

    @RequestMapping("/disable")
    public CommonResult disable(@Valid UserParam.DisableParam param){
        return userService.disable(param);
    }
}
